<template>
    <div>
        <home-banner :bannerList="bannerList"></home-banner>
        <home-myact></home-myact>
        <home-recommend :actList="actList"></home-recommend>
        <home-bottom @showSide="showSide"></home-bottom>
        <home-sidebar  :isRellyShow="isshow" @hideSide="hideSides"></home-sidebar>
        <div v-wechat-title="$route.meta.title"></div>
    </div>
</template>

<script>
import HomeBanner from './components/HomeBanner'
import HomeMyact from './components/MyAct'
import HomeRecommend from './components/Recommend'
import HomeBottom from './components/Bottom'
import HomeSidebar from '../../common/Sidebar/sideBar'
import axios from 'axios'
export default {
    name: 'Home',
    components: {
        HomeBanner,
        HomeMyact,
        HomeRecommend,
        HomeBottom,
        HomeSidebar
    },
    data () {
        return {
            bannerList: [],
            actList: [],
            isshow: false,
        }
    },
    created () {
        //获取首页所有数据
        axios.get('http://wxx.qipigou.com/api/home/gethomedata')
            .then((result) => {
                // console.log(result)
                const data = result.data.data
                this.actList = data.act_list
                
            })
    },
    mounted () {
        
    },
    methods: {
        showSide:function(){
            this.isshow = !this.isshow 
        },
        hideSides: function () {
            this.isshow = !this.isshow 
        }
    }
}
</script>

<style lang="stylus" scoped>
body
    background-color: #fbf9fe;
    
</style>